Ellipses

This Page gather some experimentation made with the ellipse() function of p5.js.

Here is the basic code used for those experimentations

counter = 0;
  for (i = 750;i>20;i -= 10){   
    counter=(counter+1)%2;
// offset = sin((i/400)*2*PI)*30;
// strokeWeight(2-((i/400)*1));
    if(counter===1){
      ellipse(400+offset, 400+offset, i, i-20-(i/4));
    } else{
      ellipse(400+offset, 400+offset, i-20, i+(i/0.4));
    }
  }

Table of Content


For Loop

Basic planet kind of nested ellipses (lattitude / longitude).

Nested Ellipses

Each ellipses fit in the previous ellipse, alternatively horizontaly and vertically.
Here I introduce a gap in the horizontal fitting.

Higher Density

Smaller increment in the for loops for closer lines and more iterations

Offseting center

Offsetting the center of the ellipse more and more during the for loop.

Out of Bound

Ellipses slowly starting to be parallel lines.

Cyclic Modulation

Using sines to displace the center of the ellipse during the loop and modifying the stroke weight.

- home -